<template>
	<view>
		<u-sticky offset-top="0">
			<u-tabs name="cate_name" activeColor="#f29100" font-size="25" :list="listTabs" :is-scroll="false"
				:current="current" @change="change"></u-tabs>
		</u-sticky>
		<page-loading :show="showPage">
		<view class="head">
			<view class="order-manage-list">
				<view v-for="(item,index) in OrderList[current]" :key='item.id' class="order-list card">
					<view class="card-top" @click="goPage(item)">
						<view class="card-top-left">
							<view style="margin: 0 20rpx;" class="flex">
								<image :src="item.headImg" style="width: 56rpx;height: 56rpx;"></image>
							</view>
							<view class="card-top-left-title">{{item.name}}</view>
							<view class="logo2 flex flex-ai-c">
								<view style="margin-left: 20rpx;" v-if="item.isPartner">
									<image src="https://files.yzsheng.com/client/order/hehuorenicon.png"></image>
								</view>
								<view style="margin-left: 20rpx;" v-if="item.isCarOwner">
									<image src="https://files.yzsheng.com/client/order/chebiao.png"></image>
								</view>
								<view style="margin-left: 60rpx;">
									<u-icon name="arrow-right" size="23rpx" color="#999999"></u-icon>
								</view>
							</view>

						</view>
						<view class="card-top-right">
							{{ item.status  }}
						</view>
					</view>

					<view @click="toDetailPage(item,item.status,item.storeId)">
						<view class="card-middle">
							<view class="card-middle-content flex">
								<view class="card-middle-content__img flex" style="font-size: 28rpx;width: 170rpx;">
									<!-- 车型： -->
									<image class="item-img" :src="item.brandurl" mode="aspectFit"
										style="width: 30rpx;height: 36rpx;"></image>
									<text style="letter-spacing: 16rpx;">车型:</text>
								</view>
								<view class="card-middle-content__title">
									{{item.carName}}
								</view>
							</view>
						</view>

						<!-- 外观 -->
						<view v-if="item.color !== '' ">
							<view class="title flex flex-ai-c">
								<view style="letter-spacing: 7rpx;width: 170rpx;">
									外观内饰:
								</view>
								<view class="flex flex-ai-c colorList">
									<view class="flex flex-ai-c flex-wrap-w">
										<view class="color"
											:style="{background:JSON.parse(item.color).outerColour.colorCoding}"></view>
										<view>外观+内饰</view>
										<view class="colorCoding flex"
											v-if="JSON.parse(item.color).inColour.neiColor.length===1">
											<!-- <view class="color" style="margin-left: 10rpx;" :style="{background:JSON.parse(item.color).inColour.colorCoding}"></view> -->
											<view class="color" style="margin-left: 10rpx;"
												:style="{background:JSON.parse(item.color).inColour.neiColor[0]}">
											</view>
										</view>
										<view v-else>
											<view style="margin-left: 10rpx;" class="color"
												:style="{background:JSON.parse(item.color).inColour.colorCoding}">
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>

						<!-- 个人方案 -->
						<view class="flex title" style="margin: 20rpx 0 20rpx 0;">
							<view style="width: 170rpx;">个人户方案:</view>
							<view style="font-size: 26rpx;" class="flex">
								<view style="margin-right: 10rpx;">首付{{item.down_payment_money}}</view>
								<view style="margin-right: 10rpx;">月供{{item.installment_monthly_money}}</view>
								<view>期数{{item.installment}}</view>
							</view>
						</view>
					</view>


					<!-- btn -->
					<view class="card-bottom">
						<!-- 待审核 待发货-->
						<view class="card-bottom-operate" v-if="item.status==='待传发票'"
							style="justify-content: space-between;">
							<view class="flex flex-ai-c">
								<i-icon icon="iconxiaoxi" type="single" size="32rpx" color="#666666"
									style="margin-right:40rpx;"></i-icon>
								<i-icon icon="icondianhua" type="single" size="28rpx" color="#666666"></i-icon>
							</view>
							<view class="card-bottom-operate__btn" @click="toDetailPage(item,item.status,item.storeId)">
								<text>代上传发票</text>
							</view>
						</view>
						<view class="card-bottom-operate" v-else>
							<view class="card-bottom-operate__btn" @click="imclick(item)">
								<i-icon icon="iconxiaoxi" type="single" size="32rpx"></i-icon>
								<text>在线咨询</text>
							</view>
							<view class="card-bottom-operate__btn">
								<i-icon icon="icondianhua" type="single" size="28rpx"></i-icon>
								<text>致电我们</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<u-loadmore :status="status[current]" margin-top="50" @loadmore="more"
				v-show='OrderList[current].length!==0' />
			<defaultImg :show='OrderList[current].length===0' msg='暂无推广信息'></defaultImg>
		</view>
		</page-loading>
	</view>
</template>

<script src='./promotion_order.js'>
</script>

<style lang="scss" scoped>
	@import './promotion_order.scss';
	@import '../buy_order/buy_order.scss';
</style>
